package com.cs.code.model;

import java.io.Serializable;

/**
 * @package com.cs.core.model.db
 * @className PrimaryKey
 * @note 主键模型
 * @author wind
 * @date 2020/12/9 19:59
 */
public class CsPrimaryKey implements Serializable {

    /**
     * 列名称
     */
    private String name;
    /**
     * 主键的名称（可为 null）
     */
    private String pkName;
    /**
     * 主键中的序列号
     */
    private short keySeq;

    /**
     * IS_AUTOINCREMENT
     */
    private String isAutoIncrement;

    /**
     * 额外信息,  MySQL特有
     */
    private String extra;

    /**
     * 是否自增
     */
    private boolean auto;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPkName() {
        return pkName;
    }

    public void setPkName(String pkName) {
        this.pkName = pkName;
    }

    public short getKeySeq() {
        return keySeq;
    }

    public void setKeySeq(short keySeq) {
        this.keySeq = keySeq;
    }

    public String getIsAutoIncrement() {
        return isAutoIncrement;
    }

    public void setIsAutoIncrement(String isAutoIncrement) {
        this.isAutoIncrement = isAutoIncrement;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public boolean isAuto() {
        return auto;
    }

    public void setAuto(boolean auto) {
        this.auto = auto;
    }

    @Override
    public String toString() {
        return "CsPrimaryKey{" +
                "name='" + name + '\'' +
                ", pkName='" + pkName + '\'' +
                ", keySeq=" + keySeq +
                ", isAutoIncrement='" + isAutoIncrement + '\'' +
                ", extra='" + extra + '\'' +
                ", auto=" + auto +
                '}';
    }
}
